home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / docs / misc / MemManual.lha / MemManual / Include / memory / memswaphook.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-01-30  |  2.0 KB  |  43 lines

  1. /*****************************************************************
  2.  ** The memory.library                                          **
  3.  **                                                             **
  4.  ** A mmu lib based virtual memory application                  **
  5.  **                                                             **
  6.  ** © 2002 THOR-Software                                        **
  7.  **                                                             **
  8.  **-------------------------------------------------------------**
  9.  ** Module: Swap Hook related                                   **
  10.  **             Defines interface functions for the swap-hook   **
  11.  ** Release 40.1        29.01.2002                              **
  12.  *****************************************************************/
  13.  
  14. #ifndef MEMORY_MEMSWAPHOOK_H
  15. #define MEMORY_MEMSWAPHOOK_H
  16.  
  17. #ifndef EXEC_TYPES_H
  18. #include <exec/types.h>
  19. #endif
  20.  
  21. /* the following packet is used for communication with the hook */
  22. struct VMHookPacket     {
  23.         ULONG   vhp_Type;       /* packet type                  */
  24.         APTR    vhp_HookInfo;   /* user defined data            */
  25.         APTR    vhp_Range;      /* physical address             */
  26.         ULONG   vhp_Size;       /* address size                 */
  27.         ULONG   vhp_Offset;     /* ID for swapping in/out       */
  28. };
  29.  
  30. /* packet types */
  31. #define VMPACK_INIT     'INIT'          /* initialize the hook, hook info */
  32. #define VMPACK_SIZE     'SIZE'          /* get the available space on the device */
  33. #define VMPACK_EXIT     'EXIT'          /* shut the hook down */
  34. #define VMPACK_OPEN     'OPEN'          /* open the hook with given swap space */
  35. #define VMPACK_CLOS     'CLOS'          /* close the hook swap space */
  36. #define VMPACK_READ     'READ'          /* swap data in */
  37. #define VMPACK_WRIT     'WRIT'          /* swap data out */
  38. #define VMPACK_TICK     'TICK'          /* motor activity tick */
  39. #define VMPACK_ALRT     'ALRT'          /* submit a user alert */
  40.  
  41. #endif
  42.  
  43.